package com.xiaoyung.easyisapisdk.feign.api.workflow;

import com.xiaoyung.easyisapisdk.common.base.IdParam;
import com.xiaoyung.easyisapisdk.common.workflow.entity.ProcHiTaskinstEntity;
import com.xiaoyung.easyisapisdk.common.workflow.request.CompleteTaskParam;
import com.xiaoyung.easyisapisdk.common.workflow.request.DelegateTaskParam;
import com.xiaoyung.easyisapisdk.common.workflow.request.RuTaskCountQueryParam;
import com.xiaoyung.easyisapisdk.common.workflow.request.TaskListQueryParam;
import com.xiaoyung.easyisapisdk.common.workflow.response.RuTaskCountResponse;

import feign.Headers;
import feign.RequestLine;

/**
 * 任务
 */
/*@Api(tags={"流程任务"})
@ApiSupport(author = "Martin",order = 5)
@RestController
@RequestMapping(value = "/openapi/task")*/
public interface TaskApi {

	/**
	 * 委派任务 只能委派到具体的某个人,不能委派角色
	 */
	/*@ApiOperation(value = "委派任务(委派到具体的某个人)")
	@ApiOperationSupport(order = 1, includeParameters = {})
	@PostMapping(value = "/delegate")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/task/delegate")
	public Void delegate(DelegateTaskParam req);
	
	/**
	 * 指派任务
	 */
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/task/changeTaskAssignee")
	public Void changeTaskAssignee(DelegateTaskParam req);
	/**
	 * 待办任务列表
	 */
	/*@ApiOperation(value = "查询待办任务列表")
	@ApiOperationSupport(order = 2, includeParameters = {})
	@ApiImplicitParams({
		@ApiImplicitParam(name = "pageNum", value = "页码", dataTypeClass = Integer.class, paramType = "query", required = false),
		@ApiImplicitParam(name = "pageSize", value = "页面大小", dataTypeClass = Integer.class, paramType = "query", required = false)
	})
	@GetMapping(value = "/listRuTask", name = "待办任务")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/task/listRuTask")
	public ProcHiTaskinstEntity listRuTask(TaskListQueryParam req);

	/*@ApiOperation(value = "查询已办任务列表")
	@ApiOperationSupport(order = 2, includeParameters = {})
	@ApiImplicitParams({
		@ApiImplicitParam(name = "pageNum", value = "页码", dataTypeClass = Integer.class, paramType = "query", required = false),
		@ApiImplicitParam(name = "pageSize", value = "页面大小", dataTypeClass = Integer.class, paramType = "query", required = false)
	})
	@GetMapping(value = "/listHisTask", name = "已办任务")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/task/listHisTask")
	public ProcHiTaskinstEntity listHisTask(TaskListQueryParam req) ;
	
	/*@ApiOperation(value = "根据id查询任务")
	@ApiOperationSupport(order = 2, includeParameters = {})
	@ApiImplicitParams({
		@ApiImplicitParam(name = "taskId", value = "任务id", dataTypeClass = String.class, paramType = "query", required = true),
	})
	@GetMapping(value = "/findTaskById")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/task/findTaskById")
	public ProcHiTaskinstEntity findTaskById(IdParam req);

	/**
	 * 办理任务,审批任务
	 */
	/*@ApiOperation(value = "办理任务")
	@ApiOperationSupport(order = 2, includeParameters = {})
	@PostMapping(value = "/completeTask", name = "办理任务(审批|填写)")
	@Transactional*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/task/completeTask")
	public Void completeTask(CompleteTaskParam req);

	/*@ApiOperation(value = "待办任务数量(按流程分类统计)")
	@ApiOperationSupport(order = 2, includeParameters = {})
	@GetMapping(value = "/rutaskCount", name = "待办任务数量(按流程分类统计)")*/
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/workflow/task/rutaskCount")
	public RuTaskCountResponse rutaskCount(RuTaskCountQueryParam req);

}
